import React,{ useState} from 'react';
import "./list.less"
import { Checkbox, Space } from 'antd-mobile'

function ListItem ({ item, history }) {

    const [Value,setValue] = useState();
    const changeRadio = (v,item)=>{
        item.checkRadio = v
        setValue(v)
    }

    return (
        <>
            <div className="box">
                <div className="boxTit">
                    <span className="boxTitSize">备件单号:{item.no}</span>
                    <Checkbox
                        value={Value}
                        onChange={v => {
                            changeRadio(v,item)
                        }}
                    > </Checkbox>
                </div>
                <div className="boxContent">
                    <div className="bcLine borderB">
                        <span className="bcLineSize">备件名称:</span>
                        <span className="bcLineSize">{item.toolNames}</span>
                    </div>
                    <div className="bcLine borderB">
                        <span className="bcLineSize">出库人:</span>
                        <span className="bcLineSize">{item.createUser}</span>
                    </div>
                </div>
            </div>
        </>
    );
}

export default ListItem;
